# -*- coding: utf-8 -*-

import pygame, sys
from pygame.locals import*

# Author : Samuel Santos
# Data: 20/05/2012
# Source: http://stthiaggo.blogspot.com
# email: thiagsamuel@gmail.com
# Description:
# i) carregando uma image e a colocando na tela.

#init pygame
pygame.init()

#colors 
white = (255,255,255)
black = (0,0,0) 

#set screen size
widthScreen, heightScreen = 400,400
screen = pygame.display.set_mode((widthScreen, heightScreen), 0,32)
pygame.display.set_caption("Rect")

#load image
blockImage = pygame.image.load("block.png")

#block position 
blockPosition = [200,200] 

#object time
clock = pygame.time.Clock()

while True:

	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			exit()

	#preenchendo a tela...
	screen.fill(white)
	
	# colocando a imagem na tela
	screen.blit(blockImage, blockPosition)
	
	#time
	clock.tick(80)
	
	#screen update
	pygame.display.flip()
	